package Threa;

import javax.swing.table.JTableHeader;

public class Thea extends Thread{
    public void run() {
        for (int i=1;i<=20;i++) {
            System.out.println(i+"、你好，来自线程"+Thread.currentThread().getName() );
        }
    }
    public static void main(String[] args){

        Thea threa=new Thea();
        threa.setName("线程1");
        threa.start();

        Thea threa1=new Thea();
        threa1.setName("线程2");
        threa1.start();

    }
}
